package cn.edu.Day05;

import javax.swing.*;
import java.awt.*;

public class MyFrame extends JFrame {
    private static Toolkit kit=Toolkit.getDefaultToolkit();
    public static final int W=360;
    public static final int H=600;
    public MyFrame()
    {
        this.add(new MyPanel());
        this.setLocation((kit.getScreenSize().width-W)/2,(kit.getScreenSize().height-H)/2);
        this.setSize(360,600);
        this.setTitle("飞机大战");
        this.setVisible(true);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
